package serializer

import "singo/model"

// Version 序列化器
type Version struct {
	UID     string `json:"id"`
	Commit  string `json:"name"`
	Author  string `json:"intro"`
	Email   string `json:"status"`
	Date    string `json:"priority"`
	Content string `json:"execute_by"`
}

// BuildVersion 序列化
func BuildVersion(item model.Version) Version {
	return Version{
		UID:     item.UID,
		Commit:  item.Commit,
		Author:  item.Author,
		Email:   item.Email,
		Date:    item.Date,
		Content: item.Content,
	}
}
